# -*- coding: utf-8 -*-
require "capistrano/ext/multistage"

set :application, "BLOG"
set :repository,  "/home/ancient/letter/ruby/rails/apps/blog"

set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, "127.0.0.1"                          # Your HTTP server, Apache/etc
role :app, "127.0.0.1"                          # This may be the same as your `Web` server
role :db,  "127.0.0.1", :primary => true # This is where Rails migrations will run
#role :db,  "your slave db-server here"

set :deploy_to, "/home/ancient/job/actindi/apache/rails-deploy"
set :use_sudo, false

# ログイン先の環境変数を設定する。
default_environment["PATH"] = "${HOME}/letter/ruby/1.8.7/bin:${PATH}"

# ssh でわけわからなくなったら次のコメントを外してみる。
# ssh_options[:verbose] = :debug

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts
namespace :deploy do
  task :start do end
  task :stop do end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end
